package com.learn.xueer.ui.viewmodel

import androidx.lifecycle.MutableLiveData
import com.learn.xueer.app.network.apiService
import com.learn.xueer.data.model.bean.PkResponse
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.ext.request

class PkSearchViewModel : BaseViewModel() {

    var requestComplete = MutableLiveData<Boolean>(false)
    lateinit var pkInfo: PkResponse

    fun getPkInfo() {
        request({ apiService.getPkInfo() }, {
            it?.let {
                pkInfo = it
                requestComplete.value = true
            }
        }, {}, false)
    }
}